<template>
  <div>
    <!--审计云系统 -->
    <div class="user-center-container">
      <!-- <commonHeader></commonHeader> -->
      <commonHeader></commonHeader>
      <div class="main-container">
        <asideNav @reload="reload"></asideNav>
        <el-main>
          <!-- <div>{{$route.meta}}</div> -->
          <!-- <div>{{$route.meta.keepAlive}}</div> -->
          <tags></tags>
          <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
          </keep-alive>
          <router-view v-if="!$route.meta.keepAlive"></router-view>
        </el-main>
      </div>
    </div>
  </div>
</template>
<script>
  // import commonHeader from "@/components/header/new_header.vue";
  import commonHeader from "@/components/header/header.vue";
  import asideNav from "./components/asideNav.vue";
  import tags from "./components/tags.vue";
  import {
    mapState
  } from "vuex";
  export default {
    provide() {
      return {
        reload: this.reload,
      };
    },
    name: "root",
    data() {
      return {
        isRouterAlive: true,
        isNetWork: true,
        newArr: [],
      };
    },
    mounted() {},
    components: {
      commonHeader,
      asideNav,
      tags
    },
    computed: {
      ...mapState({
        // userInfo: ["userInfo"],
        // personalDetails: ["personalDetails"],
      }),
    },
    created() {

    },
    methods: {
      offHand() {
        this.$router.push({
          path: "/user/identityApprove"
        });
      },

      reload() { //路由不变的情况下，刷新页面
        this.isRouterAlive = false;
        this.$nextTick(function() {
          this.isRouterAlive = true;
        });
      },
    },
    watch: {
      '$route.path': function(newVal, oldVal) {
        this.$router.push({
          path: newVal
        });
      }
    }
  };
</script>
<style lang="less">
  .student_container {
    height: calc(100vh - 160px);
    background: #FFFFFF;
    box-shadow: 0px 0px 10px 0px #E5E9EF;
    border-radius: 4px 4px 0px 4px;
        overflow-y: auto;
  }

  .user-center-container {
    // background-color: #fafafa;
    background: #F6F6F6;

    // min-height: calc(100vh);
    .footerText {
      background: #fff;
    }

    .attestation {
      width: 100%;
      height: 40px;
      line-height: 40px;
      background: #ffdcda;
      // padding: 10px 0;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #de3e2d;
      text-align: center;

      span {
        height: 20px;
        line-height: 20px;
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
      }
    }

    .main-container {

      padding-right: 18px;
      background: #F4F7FC;
      display: flex;
      height: calc(100vh - 70px);

      .loadings {
        flex: 1;
        border-radius: 4px 4px 0px 0px;
        // background-color: #fff;
        padding: 0;
        text-align: center;
        height: 686px;
        background: #fff;
        margin-top: 1px;
      }
    }

    .el-aside {
      width: 212px !important;
    }

    .el-main {
      flex: 1;
      // margin-left: 10px;
      border-radius: 4px 4px 0px 0px;
      // background-color: #fff;
      padding: 0;
    }
  }
</style>
